<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSShareLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s_share_log', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('user_id')->comment("用户id")->index();
            $table->integer('info_id')->comment("内容id")->index();
            $table->integer('info_type')->comment("分享内容类型")->defalut(1);
            $table->integer('shart_type')->comment("分享途径");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('s_share_log');
    }
}
